3.17 \(\int \frac {(d+e x)^2 (a+b \log (c x^n))}{x^5} \, dx\)

Optimal. Leaf size=95 \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{4 x^4}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {b d^2 n}{16 x^4}-\frac {2 b d e n}{9 x^3}-\frac {b e^2 n}{4 x^2} \]

[Out]

-1/16*b*d^2*n/x^4-2/9*b*d*e*n/x^3-1/4*b*e^2*n/x^2-1/4*d^2*(a+b*ln(c*x^n))/x^4-2/3*d*e*(a+b*ln(c*x^n))/x^3-1/2*
e^2*(a+b*ln(c*x^n))/x^2

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 74, normalized size of antiderivative = 0.78, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {43, 2334, 12, 14} \[ -\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {b d^2 n}{16 x^4}-\frac {2 b d e n}{9 x^3}-\frac {b e^2 n}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

-(b*d^2*n)/(16*x^4) - (2*b*d*e*n)/(9*x^3) - (b*e^2*n)/(4*x^2) - (((3*d^2)/x^4 + (8*d*e)/x^3 + (6*e^2)/x^2)*(a
+ b*Log[c*x^n]))/12

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

\begin {align*} \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^5} \, dx &=-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac {-3 d^2-8 d e x-6 e^2 x^2}{12 x^5} \, dx\\ &=-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{12} (b n) \int \frac {-3 d^2-8 d e x-6 e^2 x^2}{x^5} \, dx\\ &=-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{12} (b n) \int \left (-\frac {3 d^2}{x^5}-\frac {8 d e}{x^4}-\frac {6 e^2}{x^3}\right ) \, dx\\ &=-\frac {b d^2 n}{16 x^4}-\frac {2 b d e n}{9 x^3}-\frac {b e^2 n}{4 x^2}-\frac {1}{12} \left (\frac {3 d^2}{x^4}+\frac {8 d e}{x^3}+\frac {6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 80, normalized size = 0.84 \[ -\frac {12 a \left (3 d^2+8 d e x+6 e^2 x^2\right )+12 b \left (3 d^2+8 d e x+6 e^2 x^2\right ) \log \left (c x^n\right )+b n \left (9 d^2+32 d e x+36 e^2 x^2\right )}{144 x^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

-1/144*(12*a*(3*d^2 + 8*d*e*x + 6*e^2*x^2) + b*n*(9*d^2 + 32*d*e*x + 36*e^2*x^2) + 12*b*(3*d^2 + 8*d*e*x + 6*e
^2*x^2)*Log[c*x^n])/x^4

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 106, normalized size = 1.12 \[ -\frac {9 \, b d^{2} n + 36 \, a d^{2} + 36 \, {\left (b e^{2} n + 2 \, a e^{2}\right )} x^{2} + 32 \, {\left (b d e n + 3 \, a d e\right )} x + 12 \, {\left (6 \, b e^{2} x^{2} + 8 \, b d e x + 3 \, b d^{2}\right )} \log \relax (c) + 12 \, {\left (6 \, b e^{2} n x^{2} + 8 \, b d e n x + 3 \, b d^{2} n\right )} \log \relax (x)}{144 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="fricas")

[Out]

-1/144*(9*b*d^2*n + 36*a*d^2 + 36*(b*e^2*n + 2*a*e^2)*x^2 + 32*(b*d*e*n + 3*a*d*e)*x + 12*(6*b*e^2*x^2 + 8*b*d
*e*x + 3*b*d^2)*log(c) + 12*(6*b*e^2*n*x^2 + 8*b*d*e*n*x + 3*b*d^2*n)*log(x))/x^4

________________________________________________________________________________________

giac [A]  time = 0.32, size = 108, normalized size = 1.14 \[ -\frac {72 \, b n x^{2} e^{2} \log \relax (x) + 96 \, b d n x e \log \relax (x) + 36 \, b n x^{2} e^{2} + 32 \, b d n x e + 72 \, b x^{2} e^{2} \log \relax (c) + 96 \, b d x e \log \relax (c) + 36 \, b d^{2} n \log \relax (x) + 9 \, b d^{2} n + 72 \, a x^{2} e^{2} + 96 \, a d x e + 36 \, b d^{2} \log \relax (c) + 36 \, a d^{2}}{144 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="giac")

[Out]

-1/144*(72*b*n*x^2*e^2*log(x) + 96*b*d*n*x*e*log(x) + 36*b*n*x^2*e^2 + 32*b*d*n*x*e + 72*b*x^2*e^2*log(c) + 96
*b*d*x*e*log(c) + 36*b*d^2*n*log(x) + 9*b*d^2*n + 72*a*x^2*e^2 + 96*a*d*x*e + 36*b*d^2*log(c) + 36*a*d^2)/x^4

________________________________________________________________________________________

maple [C]  time = 0.17, size = 403, normalized size = 4.24 \[ -\frac {\left (6 e^{2} x^{2}+8 d e x +3 d^{2}\right ) b \ln \left (x^{n}\right )}{12 x^{4}}-\frac {-36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-36 i \pi b \,e^{2} x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-48 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+48 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+48 i \pi b d e x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-48 i \pi b d e x \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-18 i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+18 i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+18 i \pi b \,d^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-18 i \pi b \,d^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+36 b \,e^{2} n \,x^{2}+72 b \,e^{2} x^{2} \ln \relax (c )+72 a \,e^{2} x^{2}+32 b d e n x +96 b d e x \ln \relax (c )+96 a d e x +9 b \,d^{2} n +36 b \,d^{2} \ln \relax (c )+36 a \,d^{2}}{144 x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(b*ln(c*x^n)+a)/x^5,x)

[Out]

-1/12*b*(6*e^2*x^2+8*d*e*x+3*d^2)/x^4*ln(x^n)-1/144*(-48*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+48*I
*Pi*b*d*e*x*csgn(I*c*x^n)^2*csgn(I*c)+48*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2+36*I*Pi*b*e^2*x^2*csgn(I*x^n
)*csgn(I*c*x^n)^2+72*b*e^2*x^2*ln(c)+36*b*e^2*n*x^2+72*a*e^2*x^2+18*I*Pi*b*d^2*csgn(I*c*x^n)^2*csgn(I*c)-18*I*
Pi*b*d^2*csgn(I*c*x^n)^3-36*I*Pi*b*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+36*I*Pi*b*e^2*x^2*csgn(I*c*x^n)
^2*csgn(I*c)+96*b*d*e*x*ln(c)+32*b*d*e*n*x+96*a*d*e*x+18*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2-48*I*Pi*b*d*e*
x*csgn(I*c*x^n)^3-18*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-36*I*Pi*b*e^2*x^2*csgn(I*c*x^n)^3+36*b*d^2
*ln(c)+9*b*d^2*n+36*a*d^2)/x^4

________________________________________________________________________________________

maxima [A]  time = 0.64, size = 100, normalized size = 1.05 \[ -\frac {b e^{2} n}{4 \, x^{2}} - \frac {b e^{2} \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac {2 \, b d e n}{9 \, x^{3}} - \frac {a e^{2}}{2 \, x^{2}} - \frac {2 \, b d e \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {b d^{2} n}{16 \, x^{4}} - \frac {2 \, a d e}{3 \, x^{3}} - \frac {b d^{2} \log \left (c x^{n}\right )}{4 \, x^{4}} - \frac {a d^{2}}{4 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="maxima")

[Out]

-1/4*b*e^2*n/x^2 - 1/2*b*e^2*log(c*x^n)/x^2 - 2/9*b*d*e*n/x^3 - 1/2*a*e^2/x^2 - 2/3*b*d*e*log(c*x^n)/x^3 - 1/1
6*b*d^2*n/x^4 - 2/3*a*d*e/x^3 - 1/4*b*d^2*log(c*x^n)/x^4 - 1/4*a*d^2/x^4

________________________________________________________________________________________

mupad [B]  time = 3.73, size = 85, normalized size = 0.89 \[ -\frac {x^2\,\left (6\,a\,e^2+3\,b\,e^2\,n\right )+3\,a\,d^2+x\,\left (8\,a\,d\,e+\frac {8\,b\,d\,e\,n}{3}\right )+\frac {3\,b\,d^2\,n}{4}}{12\,x^4}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d^2}{4}+\frac {2\,b\,d\,e\,x}{3}+\frac {b\,e^2\,x^2}{2}\right )}{x^4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*x^n))*(d + e*x)^2)/x^5,x)

[Out]

- (x^2*(6*a*e^2 + 3*b*e^2*n) + 3*a*d^2 + x*(8*a*d*e + (8*b*d*e*n)/3) + (3*b*d^2*n)/4)/(12*x^4) - (log(c*x^n)*(
(b*d^2)/4 + (b*e^2*x^2)/2 + (2*b*d*e*x)/3))/x^4

________________________________________________________________________________________

sympy [A]  time = 2.75, size = 160, normalized size = 1.68 \[ - \frac {a d^{2}}{4 x^{4}} - \frac {2 a d e}{3 x^{3}} - \frac {a e^{2}}{2 x^{2}} - \frac {b d^{2} n \log {\relax (x )}}{4 x^{4}} - \frac {b d^{2} n}{16 x^{4}} - \frac {b d^{2} \log {\relax (c )}}{4 x^{4}} - \frac {2 b d e n \log {\relax (x )}}{3 x^{3}} - \frac {2 b d e n}{9 x^{3}} - \frac {2 b d e \log {\relax (c )}}{3 x^{3}} - \frac {b e^{2} n \log {\relax (x )}}{2 x^{2}} - \frac {b e^{2} n}{4 x^{2}} - \frac {b e^{2} \log {\relax (c )}}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))/x**5,x)

[Out]

-a*d**2/(4*x**4) - 2*a*d*e/(3*x**3) - a*e**2/(2*x**2) - b*d**2*n*log(x)/(4*x**4) - b*d**2*n/(16*x**4) - b*d**2
*log(c)/(4*x**4) - 2*b*d*e*n*log(x)/(3*x**3) - 2*b*d*e*n/(9*x**3) - 2*b*d*e*log(c)/(3*x**3) - b*e**2*n*log(x)/
(2*x**2) - b*e**2*n/(4*x**2) - b*e**2*log(c)/(2*x**2)

________________________________________________________________________________________